package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import com.atguigu.eduservice.client.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author shkstart
 * @create 2022-09-29 20:01
 */
//,fallback = VodFileDegradeFeignClient.class
@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class) //调用的服务名称
//@Component
public interface VodClient {

    //定义调用的方法路径
    //删除腾讯云视频
    //@PathVariable("videoId")一定要加上参数的值
    @DeleteMapping("/eduvod/video/removeVideo/{videoId}")
    public R remove(@PathVariable("videoId") String videoId);

    //删除多个腾讯云视频的方法
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoList") List<String> videoList);
}
